#pragma once

namespace CO { namespace MyGroupNamespace { namespace MyPackageNamespace {

class MyPayload : public SpiFoundation::RoomFW::IPayload
{
public:

	//
	// Constructor/Destructor.
	//
	MyPayload(double value);
	virtual ~MyPayload(void);

	//
	// IPayload overrides.
	//
	virtual bool isSafe(void) const;
	virtual SpiFoundation::RoomFW::PayloadTypeId getTypeID() const;
	virtual std::string toString(void) const;
	virtual void serialize(SpiFoundation::RoomFW::oarchive& ar, const unsigned int /*version*/) const;
	virtual void serialize(SpiFoundation::RoomFW::iarchive& ar, const unsigned int /*version*/);
	virtual SpiFoundation::RoomFW::IPayloadSP clone();

	//
	// Accessor.
	//
	double value(void);

private:

	//
	// TODO:  Add attributes.
	//
	double value_;
};
typedef ::boost::shared_ptr<MyPayload> MyPayloadSP;

}}} // End namespace

//
// Tell boost not to track multiple pointers to the same object.  This is
// necessary the way the interface is currently defined, but maybe it should
// be further examined.  At the very least, it implies that we'd better not
// serialize an object containing multiple pointers to the same object.
// We can't do this inside a namespace because it declares the boost ns.
//
// Note:  This is only used for binding over TCP/IP.
//
BOOST_CLASS_TRACKING(CO::MyGroupNamespace::MyPackageNamespace::MyPayload, ::boost::serialization::track_never)

